#ifndef _STRAWGUI_LEVEL_RESOURCE_H_
#define _STRAWGUI_LEVEL_RESOURCE_H_

#include "sResource.h"
#include "sConfig.h"
#include "sNamedObjectContainer.h"
#include "sTRFrame.h"
#include "sObjectLevel.h"
#include "sGui.h"

namespace sgui
{
namespace res
{
	class sLevelResource : public sResource
	{
	public:
		static const std::wstring RESOURCE_NAME;
	private:
		CONTAINER_WRAPPER(sObjectLevel) m_levels;
	public:
		CONTAINER_WRAPPER(sObjectLevel)& getLevels();
		const CONTAINER_WRAPPER(sObjectLevel)& getLevels() const;

		void load(const db::Record &file);
		void save(db::Record &file) const;
        void clear();
        
        preset::sPreset* getPreset(const std::wstring& name);
        const std::wstring getClass() const { return RESOURCE_NAME; };

#ifdef _EDITOR
		void exportRTTI(rtti::sInfoList& list);
#endif

		sLevelResource(sGUI& gui, const std::wstring& name);
        ~sLevelResource();
	};

};
};

#endif